import axios from 'axios';

// console.log(process.env.NODE_ENV)

// let baseURL = '/api_my'; 
let baseURL = 'https://d33a5037-6c63-4e92-8bb1-30018ab701ea.bspapp.com/http'; // 开发的路径  


// if (process.env.NODE_ENV === 'production') {
// 	baseURL = 'https://c5f1f89d-122e-4f45-bfaf-4ea4822187cb.bspapp.com/http'
// }
// 分身1
let default_axios = axios.create({
	baseURL
});


default_axios.interceptors.request.use((config) => {

	return config

}, (err) => {

	return Promise.reject(err)

})

// 响应拦截 
default_axios.interceptors.response.use((res) => {

	return res.data

}, (err) => {

	return Promise.reject(err)

});


export default default_axios